﻿<Window x:Class="Dreambuild.Gis.Desktop.HelixWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:helix="http://helixtoolkit.codeplex.com"
        Title="CityGIS Desktop" Height="720" Width="1200" WindowStartupLocation="CenterScreen">

    <DockPanel x:Name="LayoutRoot" Background="White">
        <DockPanel Name="Sidebar" DockPanel.Dock="Left" Width="270">
            <Border Background="Orange" DockPanel.Dock="Top">
                <TextBlock Name="AppTitle" Text="CityGIS Desktop" Margin="10" FontSize="20" FontFamily="Georgia" TextAlignment="Center" />
            </Border>
            <ScrollViewer VerticalScrollBarVisibility="Auto" BorderThickness="0">
                <StackPanel Name="PanelStack">
                    <Expander x:Name="LayerPanel" Header="操作" Margin="5" Background="Beige" BorderBrush="LightGray" IsExpanded="True" />
                </StackPanel>
            </ScrollViewer>
        </DockPanel>
        <Grid>
            <Grid.Resources>
                <Style TargetType="Button">
                    <Setter Property="Background" Value="Transparent" />
                    <Setter Property="Foreground" Value="White" />
                    <Setter Property="Padding" Value="20,3" />
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <StackPanel Name="stack" Width="{TemplateBinding Property=Width}" Height="{TemplateBinding Property=Height}" Background="{TemplateBinding Property=Background}" >
                                    <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" Margin="{TemplateBinding Control.Padding}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" />
                                </StackPanel>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Grid.Resources>

            <Border BorderThickness="1" BorderBrush="DarkGray">
                <helix:HelixViewport3D x:Name="TheViewport" ZoomExtentsWhenLoaded="True" Background="#E6E6E6">

                    <!-- Remember to add light to the scene -->
                    <helix:SunLight/>

                </helix:HelixViewport3D>
            </Border>
            <Border VerticalAlignment="Top" Margin="10,10,10,0" Padding="1">
                <Border.Background>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop  Color="#80808080" Offset="0" />
                        <GradientStop Color="#80000000" Offset="1" />
                    </LinearGradientBrush>
                </Border.Background>
                <StackPanel Name="Toolbar" Orientation="Horizontal">
                    <Button Name="btnAbout" Content="关于" />
                </StackPanel>
            </Border>
            <Border HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,20" Background="#80000000">
                <TextBlock Padding="20,5" Name="Message" Text="CityGIS Desktop" Foreground="White" />
            </Border>

        </Grid>
    </DockPanel>
</Window>
